import request from '@/utils/request';

// 登录方法
export function login(params) {
  return request({
    method: 'GET',
    url: 'loginUser/',
    params,
  });
}

// 用户注册方法
export function register(data) {
  return request({
    method: 'POST',
    url: 'loginUser/',
    data,
  });
}
export function getInfo(token) {

}

export function logout() {

}

// 获取商铺列表数据
export function getShopList(params) {
  return request({
    method: 'GET',
    url: '/shopsData',
    params,
  });
}
// 新增商铺
export function addShopList(data) {
  return request({
    method: 'POST',
    url: '/shopsData',
    data,
  });
}
// 删除商铺数据
export function delData(id) {
  return request({
    method: 'DELETE',
    url: `/shopsData/${id}`,
  });
}
// 编辑商铺数据
export function modifyData(data, id) {
  return request({
    method: 'PATCH',
    url: `/shopsData/${id}`,
    data,
  });
}

